package com.hqyj.pojo;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 订单明细对象
 * </p>
 *
 * @author rock
 * @since 2023-01-28 09:21:58
 */
@Getter
@Setter
@TableName("order_detail")
public class OrderDetail implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 订单明细主键
     */
    @TableId(value = "order_detail_id", type = IdType.ASSIGN_UUID)
    private String orderDetailId;

    /**
     * 订单id
     */
    @TableField("order_id")
    private String orderId;

    /**
     * 订单状态 0 已经提交订单 1取消订单
     */
    @TableField("order_status")
    private Integer orderStatus;

    /**
     * 卖家Id
     */
    @TableField("seller_id")
    private String sellerId;

    /**
     * 卖家备货状态 0 备货中 1 备货完成 2 缺货中
     */
    @TableField("seller_status")
    private Integer sellerStatus;

    /**
     * 买家状态 0 未收货 1 已收货 2 退货
     */
    @TableField("buyer_status")
    private Integer buyerStatus;

    /**
     * 商品id
     */
    @TableField("goods_id")
    private Integer goodsId;

    /**
     * 商品单价
     */
    @TableField("goods_price")
    private BigDecimal goodsPrice;

    /**
     * 商品数量
     */
    @TableField("goods_num")
    private Integer goodsNum;

    /**
     * 商品总金额
     */
    @TableField("goods_money")
    private BigDecimal goodsMoney;

    /**
     * 订单创建时间
     */
    @TableField(value = "create_time",fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 逻辑删除  0 未删除  1删除
     */
    @TableField("deleted")
    @TableLogic
    private Integer deleted;

    //查询的商品名称
    @TableField(exist = false)
    private String goodsName;
    //查询的商品图片路径
    @TableField(exist = false)
    private String goodsImg;

}
